package com.erp.erp_servers.ProductBoxGauge.impl;

import com.erp.erp_dao.ProductBoxGauge.ProductBoxGaugeDao;
import com.erp.erp_entitys.ProductBoxGauge.ProductBoxGauge;
import com.erp.erp_servers.ProductBoxGauge.IProductBoxGaugeService;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zjk
 * @version 1.0
 * @description
 * @date 2021-09-12 18:06
 */
@Service
public class ProductBoxGaugeServiceImpl implements IProductBoxGaugeService {

    private final ProductBoxGaugeDao boxGaugeDao;

    public ProductBoxGaugeServiceImpl(ProductBoxGaugeDao boxGaugeDao) {
        this.boxGaugeDao = boxGaugeDao;
    }

    @Override
    public Integer insertSelective(ProductBoxGauge record) {
        return boxGaugeDao.insertSelective(record);
    }

    @Override
    public PageInfo<ProductBoxGauge> findBoxGaugeByParam(String productCode, String specificationCode) {
        List<ProductBoxGauge> list=boxGaugeDao.findBoxGaugeByParam(productCode,specificationCode);
        PageInfo pageInfo=new PageInfo(list);
        return pageInfo;
    }

    @Override
    public Integer updateByParam(ProductBoxGauge record) {
        return boxGaugeDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public Integer deleteByIds(List<Integer> ids) {
        return boxGaugeDao.deleteByIds(ids);
    }

    @Override
    public int deleteByParam(ProductBoxGauge record) {
        return boxGaugeDao.deleteByParam(record);
    }
}
